package main

import "context"

var handleMap map[string]func([]byte) error

func init() {
	handleMap = make(map[string]func([]byte) error)
}

// 注册更新处理
func RegisterUpdateHandle(key string, f func([]byte) error) {
	handleMap[key] = f
}

type PubClient interface {
	Pub(ctx context.Context, key string, val string)
}

var Pub PubClient
